package com.jinmdz.fmis.dao.dao;


import com.jinmdz.fmis.dao.model.document.PhotoDocumentFileItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;


/**
 * 拍照备案
 *
 * @author GuanKui
 * @date 2020/2/20 14:21
 */
public interface DocumentFileDao {

    /**
     * 根据businessCode加载拍照备案页面所有信息
     *
     * @param businessCode 业务编码
     * @return
     * @author GuanKui
     * @date 2020/2/17 12:45
     */
    @Select("select id,document_type_code,thumb_path,file_path,version from document_file where business_code = #{businessCode} and deleted=0 ")
    ArrayList<PhotoDocumentFileItem> listPhotoDocumentFileByBusinessCode(@Param("businessCode") String businessCode);


    /**
     * 根据businessCode加载拍照备案页面所有信息
     *
     * @param businessCode     业务编码
     * @param documentTypeCode 文档类型
     * @return
     * @author GuanKui
     * @date 2020/2/17 12:45
     */
    @Select("select id,document_type_code,thumb_path,file_path,version from document_file where business_code = #{businessCode} and document_type_code= #{documentTypeCode} and deleted=0 ")
    ArrayList<PhotoDocumentFileItem> listPhotoDocumentFileByTypeCode(@Param("businessCode") String businessCode, @Param("documentTypeCode") Integer documentTypeCode);

}
